# class Person:
#     pass
# p = Person()
# p.name = 'fangyukui'
# p.age = 12
# p.gender = 'female'
# del  p.gender
# print(p.__class__)
# print(Person)
# print(p.name,p.age)
# #__dict__查看person所有属性
# print(p.__dict__)


# class Dog:
#     name = 'hapi'
#     age = 2
#     weight = 30
# d = Dog()
# print(Dog.name, Dog.age, Dog.weight)
# print(d.name, d.age, d.weight)
# print(Dog.__dict__)
# print(d.__dict__)


# class Dog:
#     name = 'hapi'
#     age = 2
#     weight = 30
# d = Dog()
# d.name = 'marray'
# print(Dog.name, Dog.age, Dog.weight)
# print(d.name, d.age, d.weight)
# print(Dog.__dict__)
# print(d.__dict__)


#除了查操作对象没有改属性会去类中找，其他操作都不会去类对象对其改变

#d 对象没有age属性,报错，具体有没有该属性，调用__dict__就知道
# class Dog:
#     name = 'hapi'
#     age = 2
#     weight = 30
# d = Dog()
# print(d.__dict__)
# del d.age








